package com.rayson.oneapi.gateway.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rayson.oneapi.gateway.mapper.InterfaceMapper;
import com.rayson.oneapi.gateway.model.InterfaceEntity;
import com.rayson.oneapi.gateway.service.InterfaceService;
import org.springframework.stereotype.Service;

/**
 * Author: rayson
 * Description:
 * Version: 1.0
 * Date: 2024-09-10 20:58
 */
@Service
public class InterfaceServiceImpl extends ServiceImpl<InterfaceMapper, InterfaceEntity>
        implements InterfaceService {

    @Override
    public InterfaceEntity getInterfaceByInterfaceNumber(String interfaceNumber) {
        LambdaQueryWrapper<InterfaceEntity> queryWrapper = lambdaQuery().getWrapper()
                .eq(InterfaceEntity::getInterfaceNumber, interfaceNumber);
        return getOne(queryWrapper);
    }
}
